<nav class="ui inverted attached segment i-padded-tb-mini i-shadow-small">
	<div class="ui container">
		<div class="ui inverted secondary stackable menu navbarlist">
			<h2 class="ui teal header item">Blog</h2>
			<a href="index.html" class="i-item item i-mobile-hide"><i class="home mini icon"></i>首页</a>
			<a href="types.html?type=default" class="i-item item i-mobile-hide"><i class="idea mini icon"></i>分类</a>
			<a href="tags.html?type=default" class=" i-item item i-mobile-hide"><i class="tags mini icon"></i>标签</a>
			<a href="archives.html" class="i-item item i-mobile-hide"><i class="tags mini icon"></i>归档</a>
			<a href="about.html" class="i-item item i-mobile-hide"><i class="info mini icon"></i>关于我</a>
			<a href="statistics.html" class="i-item item i-mobile-hide"><i class="chart bar mini icon"></i>统计</a>
			<div class="i-item right item i-mobile-hide">
				<div class="ui icon inverted transparent input">
					<input type="text" placeholder="Search...">
					<i class="search link icon"></i>
				</div>
			</div>
			<div class="right item" id="rlDiv">
				<a class="ui inverted button i-margin-right-tiny" id="login">登录</a>
				<a class="ui inverted button" id="regist" style="margin-left: 5px;">注册</a>
			</div>
			<div class="item hidden" style="display: none;" id="managerControl">
			<a class="ui inverted button i-margin-right-tiny" href="admin/blogs.html">后台管理</a>
			</div>
		</div>
	</div>
	<a href="#" class="ui menu toggle black button icon i-right-top i-mobile-show">
		<i class="sidebar icon"></i>
	</a>
</nav>
<script>
	$(function(){
		/**
		 * 如果已经登录过则隐藏用户
		 */
		if($.cookie("userid")==null||$.cookie("userid")==undefined||window.sessionStorage.getItem('myblog')==null){
			$('#rlDiv').show();
			$('#managerControl').hide();
		}else{
			$('#rlDiv').hide();
			$('#managerControl').show();
		}
		
	})
	
	//登录跳转
	$('#login').on('click',function(){
		$('#login').attr('href','admin/login.html');
	})
	
	//注册跳转
	$('#regist').on('click',function(){
		$('#regist').attr('href','admin/regist.html');
	})

</script>